﻿@model S4Store.Models.Report.CarModelOrderTimeRateModel
@{
    Layout = null;
    ViewBag.Title = "CarModelOrderTimeRate";
    
}
<div style="height:100%; overflow:auto">
@Html.Action("ReportBar", "Common", Model.BarModel)
<div class="pageContent">
	
	<div class="tabs" currentIndex="0" eventType="click">
		<div class="tabsHeader">
			<div class="tabsHeaderContent">
				<ul>
					<li><a href="javascript:;"><span>@(Model.CarBrand.Name)订单时间进度差</span></a></li>
					<li><a href="javascript:;"><span>@(Model.CarBrand.Name)意向客户订单预估</span></a></li>
					
				</ul>
			</div>
		</div>
		<div class="tabsContent" >
			<div>
            <table  style="border-collapse:collapse; width:100%" class="reporttable vmiddle"> 
             <tr>
              <th rowspan="3">车型</th>
              <th rowspan="3">车款</th>
              <th colspan="8">订车</th>
             </tr>
             <tr>
              <th rowspan="2">上月未交</th>
              <th rowspan="2">本月已定</th>
              <th colspan="2">当日</th>
              <th rowspan="2">本月累计</th>
              <th rowspan="2">目标订单</th>
              <th rowspan="2">订单进度</th>
              <th rowspan="2">进度差异</th>
             </tr>
             <tr>
              <th>二网</th>
              <th>本店</th>
             </tr>
             @{int index=0;}
             @foreach (var report in Model.Reports)
             {
             <tr>
                @if (index++ == 0)
                {
                    <td rowspan="@Model.Reports.Count">@Model.CarBrand.Name</td>
                }
               <td>@report.CarModel.Name</td>
                <td>@report.CarModelMonthConfig.LastMonthNotGive</td>
                @{var ordercount = report.OrderCount;}
                @{report.ShowLastDay(true);             }
                <td>@(ordercount - report.EWYD-report.BDYD)</td>
                <td>@report.EWYD</td>
                <td>@report.BDYD</td>
                @{report.ShowLastDay(false);             }
                <td>@report.OrderCount</td>
                <td>@report.OrderTarget</td>
                <td @S4Store.Utils.GetBgColor(report.OrderRateDiff>=0)>@report.OrderRate.toInt()%</td>
                <td @S4Store.Utils.GetBgColor(report.OrderRateDiff>=0)>@report.OrderRateDiff.toInt()%</td>
             </tr>
             }
             </table>
			</div>
			<div>
            <table  style="border-collapse:collapse; width:100%" class="reporttable vmiddle"> 
             <tr>
              <th rowspan="3">车型</th>
              <th rowspan="3">车款</th>
              <th colspan="3">当日累计有望客户总数</th>
              <th colspan="4">当日新增有望客户数</th>
              <th rowspan="3">当前预估订单</th>
              <th rowspan="3">预估订单差距</th>
             </tr>
             <tr>
              <th rowspan="2">H级</th>
              <th rowspan="2">A级</th>
              <th rowspan="2">B级</th>
              <th colspan="3">当日新增</th>
              <th rowspan="2">本月累计</th>
             </tr>
             <tr>
              <th>H级</th>
              <th>A级</th>
              <th>B级</th>
             </tr>
             @{index=0;}
             @foreach(var report in Model.Reports){
             <tr>
                @if(index++==0){
                    <td rowspan="@Model.Reports.Count">@Model.CarBrand.Name</td>
                }
               <td>@report.CarModel.Name</td>
                <td>@report.HYWKH</td>
                <td>@report.AYWKH</td>
                <td>@report.BYWKH</td>
                @{report.ShowLastDay(true);             }
                <td>@report.HYWKH</td>
                <td>@report.AYWKH</td>
                <td>@report.BYWKH</td>
                @{report.ShowLastDay(false);             }
                <td>@report.RegisterCustomerCount</td>
                <td>@report.YGDD</td>
                <td @S4Store.Utils.GetBgColor(report.YGDDCJ >= 0)>@report.YGDDCJ</td>
             </tr>
             }
             </table>
			</div>
		</div>
		<div class="tabsFooter">
			<div class="tabsFooterContent"></div>
		</div>
	</div>
</div>


</div>